﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
           {

            Console.WriteLine("请输入炒菜或者是传菜");
            string s = Console.ReadLine();
            Robot a = text(s);
            a.Working();
        }

        public static Robot text(string s ) 
        {
            Robot t;

            if (s=="炒菜")
            {
                t = new CookRobot("孙悟空",vagetabal.佛跳墙);
                return t;
            }
            else if (s == "传菜")
            {
                t = new DeliveryRobot("猪八戒", 24);
                return t;
            }
            else
            {
                t = new CookRobot("孙悟空", vagetabal.佛跳墙);
                return t;
            }

            
        }
    }
}
